package com.sigmazero13.bgjeeves.model;


public class Scoreboard {

	public static enum ScoreboardType {
		TOP_10("Top 10"),
		BY_PLAYER("By Player");
		
		private String typeName;
		
		private ScoreboardType(String typeName) {
			this.typeName = typeName;
		}
		
		public String getTypeName() {
			return typeName;
		}
		
		@Override
		public String toString() {
			return typeName;
		}
		
		public static ScoreboardType getScoreboardType(int ord) {
			for (ScoreboardType st : ScoreboardType.values()) {
				if (ord == st.ordinal())
					return st;
			}
			return null;
		}
	}
	
	public static enum CalculationType {
		TOP_SCORE("Top Score"),
		OVERALL_AVERAGE("Overall Average"),
		LAST_5_AVERAGE("Last 5 Average");
		
		private String typeName;
		
		private CalculationType(String typeName) {
			this.typeName = typeName;
		}
		
		public String getTypeName() {
			return typeName;
		}
		
		@Override
		public String toString() {
			return typeName;
		}
		
		public static CalculationType getCalculationType(int ord) {
			for (CalculationType ct : CalculationType.values()) {
				if (ord == ct.ordinal())
					return ct;
			}
			return null;
		}
	}
	
}
